/*
 * @description: 国际化判断工具
 * @Author: Islands
 * @Date: 2024-03-25 20:20:38
 * @LastEditTime: 2024-03-26 00:08:18
 */
import i18n from "@/i18n/index";

export function translateRouteTitle(title: any) {
  // 判断是否存在国际化配置，如果没有原生返回
  const hasKey = i18n.global.te("route." + title);
  if (hasKey) {
    const translatedTitle = i18n.global.t("route." + title);
    return translatedTitle;
  }
  return title;
}
